Use evtest to record raw keyboard and mouse input events from Linux or BSD kernel interfaces for debugging hardware faults and testing automation scripts.